import { Controller, Get, Query } from '@nestjs/common';
import { MessageService } from './message.service';

@Controller('message')
export class MessageController {
  constructor(private readonly messageService: MessageService) {}

  // 查找房间聊天记录
  @Get('list')
  async list(@Query('roomId') roomId: string) {
    return this.messageService.list(+roomId);
  }
}
